<script>on mouseUpif the OptionKey is down thenshow field "SearchPattern1"else if the CommandKey is down thenask "Proximity range (bytes)?" with 48setNeighborhoodSize It -- reset neighborhood for proximity searchelse -- empty the subset associated with Index field #1checkOpenDatabaseif not (getSubsetHandle(1) = 0 or getSubsetHandle(1) = empty) thenget zbrowser ("RELEASESUBSET", getSubsetHandle(1))end ifsetSubsetHandle 1,zbrowser("NEWSUBSET",getTextFileRefNum())get zbrowser ("EMPTYSUBSET", getSubsetHandle(1))browseIndex1put empty into field "SearchPattern1"show field "SearchPattern1"show bg button "fill subset 1"show bg button "not subset 1"if the visible of bg button "fill subset 2" thenshow bg button "or subsets"show bg button "and subsets"end ifend ifend mouseUp</script>
</part>
<part>
<id>20</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>257</left>
<top>0</top>
<right>279</right>
<bottom>22</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>29514</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>empty subset 2</name>
<script>on mouseUpif the OptionKey is down thenshow field "SearchPattern2"else if the CommandKey is down thenask "Proximity range (bytes)?" with 48setNeighborhoodSize It -- reset neighborhood for proximity searchelse -- empty the subset associated with Index field #2checkOpenDatabaseif not (getSubsetHandle(2) = 0 or getSubsetHandle(2) = empty) thenget zbrowser ("RELEASESUBSET", getSubsetHandle(2))end ifsetSubsetHandle 2,zbrowser("NEWSUBSET",getTextFileRefNum())get zbrowser ("EMPTYSUBSET", getSubsetHandle(2))browseIndex2put empty into field "SearchPattern2"show field "SearchPattern2"show bg button "fill subset 2"show bg button "not subset 2"if the visible of bg button "fill subset 1" thenshow bg button "or subsets"show bg button "and subsets"end ifend ifend mouseUp</script>
</part>
<part>
<id>39</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>493</left>
<top>173</top>
<right>512</right>
<bottom>193</bottom>
</rect>
<style>rectangle</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>22489</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>pageDownContext</name>
<script>on mouseDownglobal contextLinescheckOpenDatabaseif line contextLines of field Context is empty then exit mouseDownsetInstanceNum getTextPtrListInstanceItem (contextLines)browseContext 1setInstanceNum getTextPtrListInstanceItem (1)end mouseDownon mouseStillDownglobal contextLinesif line contextLines of field Context is empty then exit mouseStillDownsetInstanceNum getTextPtrListInstanceItem (contextLines)browseContext 1setInstanceNum getTextPtrListInstanceItem (1)end mouseStillDown</script>
</part>
<part>
<id>38</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>493</left>
<top>135</top>
<right>512</right>
<bottom>159</bottom>
</rect>
<style>rectangle</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>22489</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>pageUpContext</name>
<script>on mouseDownglobal contextLinescheckOpenDatabaseif line 1 of field Context is empty then exit mouseDownbrowseContext contextLinessetInstanceNum getTextPtrListInstanceItem (1)end mouseDownon mouseStillDownglobal contextLinesif line 1 of field Context is empty then exit mouseStillDownbrowseContext contextLinessetInstanceNum getTextPtrListInstanceItem (1)end mouseStillDown</script>
</part>
<part>
<id>33</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>213</left>
<top>86</top>
<right>233</right>
<bottom>105</bottom>
</rect>
<style>rectangle</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>22489</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>pageDownIndex1</name>
<script>on mouseDownglobal indexLinescheckOpenDatabaseif line indexLines of field index1 is empty thenbeepexit mouseDownend ifsetWordNum1 (getWordNum1() + indexLines - 1)browseIndex1end mouseDownon mouseStillDownglobal indexLinesif line indexLines of field index1 is empty thenbeepexit mouseStillDownend ifsetWordNum1 (getWordNum1() + indexLines - 1)browseIndex1end mouseStillDown</script>
</part>
<part>
<id>25</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>213</left>
<top>49</top>
<right>233</right>
<bottom>72</bottom>
</rect>
<style>rectangle</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>22489</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>pageUpIndex1</name>
<script>on mouseDownglobal indexLinescheckOpenDatabaseget getWordNum1() - indexLines + 1if It < 0 thenbeepput 0 into Itend ifsetWordNum1 ItbrowseIndex1end mouseDownon mouseStillDownglobal indexLinesget getWordNum1() - indexLines + 1if It < 0 thenbeepput 0 into Itend ifsetWordNum1 ItbrowseIndex1end mouseStillDown</script>
</part>
<part>
<id>35</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>492</left>
<top>49</top>
<right>512</right>
<bottom>72</bottom>
</rect>
<style>rectangle</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>22489</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>pageUpIndex2</name>
<script>on mouseDownglobal indexLinescheckOpenDatabaseget getWordNum2() - indexLines + 1if It < 0 thenbeepput 0 into Itend ifsetWordNum2 ItbrowseIndex2end mouseDownon mouseStillDownglobal indexLinesget getWordNum2() - indexLines + 1if It < 0 thenbeepput 0 into Itend ifsetWordNum2 ItbrowseIndex2end mouseStillDown</script>
</part>
<part>
<id>36</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>493</left>
<top>86</top>
<right>512</right>
<bottom>105</bottom>
</rect>
<style>rectangle</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>22489</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>pageDownIndex2</name>
<script>on mouseDownglobal indexLinescheckOpenDatabaseif line indexLines of field index2 is empty thenbeepexit mouseDownend ifsetWordNum2 (getWordNum2() + indexLines - 1)browseIndex2end mouseDownon mouseStillDownglobal indexLinesif line indexLines of field index2 is empty thenbeepexit mouseStillDownend ifsetWordNum2 (getWordNum2() + indexLines - 1)browseIndex2end mouseStillDown</script>
</part>
<part>
<id>31</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>495</left>
<top>104</top>
<right>512</right>
<bottom>120</bottom>
</rect>
<style>rectangle</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>20407</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>scrollDownIndex2</name>
<script>on mouseDownglobal indexLinescheckOpenDatabaseif line indexLines of field Index2 is empty thenbeepexit mouseDownend ifsetWordNum2 (getWordNum2() + 1)browseIndex2end mouseDownon mouseStillDownglobal indexLinesif line indexLines of field Index2 is empty thenbeepexit mouseStillDownend ifsetWordNum2 (getWordNum2() + 2)browseIndex2end mouseStillDown</script>
</part>
<part>
<id>32</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>496</left>
<top>71</top>
<right>512</right>
<bottom>87</bottom>
</rect>
<style>rectangle</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>15717</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>jumpIndex2</name>
<script>on mouseUpcheckOpenDatabaseask "Word to jump to?"if It is empty then exit to HyperCardlock screensetWordNum2 (line 1 of zbrowser ("LOCATE", It, getKeyFileRefNum()))if getWordNum2() < 0 then setWordNum2(0)browseIndex2end mouseUp</script>
</part>
<part>
<id>30</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>495</left>
<top>35</top>
<right>512</right>
<bottom>51</bottom>
</rect>
<style>rectangle</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>24019</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>scrollUpIndex2</name>
<script>on mouseDowncheckOpenDatabaseget getWordNum2() - 1if It < 0 thenbeepput 0 into Itend ifsetWordNum2 ItbrowseIndex2end mouseDownon mouseStillDownget getWordNum2() - 2if It < 0 thenbeepput 0 into Itend ifsetWordNum2 ItbrowseIndex2end mouseStillDown</script>
</part>
<part>
<id>34</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>216</left>
<top>35</top>
<right>233</right>
<bottom>51</bottom>
</rect>
<style>rectangle</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>24019</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>scrollUpIndex1</name>
<script>on mouseDowncheckOpenDatabaseget getWordNum1() - 1if It < 0 thenbeepput 0 into Itend ifsetWordNum1 ItbrowseIndex1end mouseDownon mouseStillDownget getWordNum1() - 2if It < 0 thenbeepput 0 into Itend ifsetWordNum1 ItbrowseIndex1end mouseStillDown</script>
</part>
<part>
<id>12</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>217</left>
<top>71</top>
<right>233</right>
<bottom>87</bottom>
</rect>
<style>rectangle</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>15717</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>jumpIndex1</name>
<script>on mouseUpcheckOpenDatabaseask "Word to jump to?"if It is empty then exit to HyperCardlock screensetWordNum1 (line 1 of zbrowser ("LOCATE", It, getKeyFileRefNum()))if getWordNum1() < 0 then setWordNum1(0)browseIndex1end mouseUp</script>
</part>
<part>
<id>3</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>279</left>
<top>35</top>
<right>496</right>
<bottom>120</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Monaco</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<textHeight>12</textHeight>
<name>Index2</name>
<script>on mouseUpglobal whichSubsetput ShiftKey() into shiftyput OptionKey() into optycheckOpenDatabase -- make sure files are openset cursor to watchlock screenput clickedLineNum() into clickedLineif shifty is down and getSubsetHandle(2) is not 0 then-- must add or subtract word from subsetshow field "SearchPattern2"if opty is down then -- subtract the wordput " and not " & last word of line clickedLine of field "Index2"¬after field "SearchPattern2"get zbrowser ("SETSUBSETBITS", clickedLine + getWordNum2() - 1,¬getNeighborhoodSize(), 0, getKeyFileRefNum(), getPtrFileRefNum(),¬getSubsetHandle(2))else -- add the wordif field "SearchPattern2" is not empty thenput " or " after field "searchPattern2"end ifput last word of line clickedLine of field "Index2" after¬field "SearchPattern2"get zbrowser ("SETSUBSETBITS", clickedLine + getWordNum2() - 1,¬getNeighborhoodSize(), 1, getKeyFileRefNum(), getPtrFileRefNum(),¬getSubsetHandle(2))end ifbrowseIndex2else--must retrieve clicked wordput getInstanceList2item (clickedLine) into instanceNumif instanceNum is empty thenbeepanswer "Sorry, nothing to retrieve!"exit to HyperCardend ifsetInstanceNum instanceNumput 2 into whichSubsetbrowseContext 1end ifend mouseUp</script>
</part>
<part>
<id>1</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>0</left>
<top>35</top>
<right>217</right>
<bottom>120</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Monaco</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<textHeight>12</textHeight>
<name>Index1</name>
<script>on mouseUpglobal whichSubsetput ShiftKey() into shiftyput OptionKey() into optycheckOpenDatabase -- make sure files are openset cursor to watchlock screenput clickedLineNum() into clickedLineif shifty is down and getSubsetHandle(1) is not 0 then-- must add or subtract word from subsetshow field "SearchPattern1"if opty is down then -- subtract the wordput " and not " & last word of line clickedLine of field "Index1"¬after field "SearchPattern1"get zbrowser ("SETSUBSETBITS", clickedLine + getWordNum1() - 1,¬getNeighborhoodSize(), 0, getKeyFileRefNum(), getPtrFileRefNum(),¬getSubsetHandle(1))else -- add the wordif field "SearchPattern1" is not empty thenput " or " after field "searchPattern1"end ifput last word of line clickedLine of field "Index1" after¬field "SearchPattern1"get zbrowser ("SETSUBSETBITS", clickedLine + getWordNum1() - 1,¬getNeighborhoodSize(), 1, getKeyFileRefNum(), getPtrFileRefNum(),¬getSubsetHandle(1))end ifbrowseIndex1else--must retrieve clicked wordput getInstanceList1item (clickedLine) into instanceNumif instanceNum is empty thenbeepanswer "Sorry, nothing to retrieve!"exit to HyperCardend ifsetInstanceNum instanceNumput 1 into whichSubsetbrowseContext 1end ifend mouseUp</script>
</part>
<part>
<id>4</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>0</left>
<top>123</top>
<right>496</right>
<bottom>208</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Monaco</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<textHeight>12</textHeight>
<name>Context</name>
<script>on mouseUp-- modified script for Context Field, to get the tags for stack name-- and card number for indexed stack (via tag file) -- ^z -- 19901020global textChunkSize, textOffsetlock screenset cursor to watchcheckOpenDatabase -- make sure files are openput clickedLineNum() into clickedLineput getTextPtrListPtrItem(clickedLIne) into textPtrif textPtr < 0 thenbeepanswer "Sorry, nothing to retrieve!"exit to HyperCardend ifhide field "SearchPattern1"hide field "SearchPattern2"put zbrowser ("TEXT", textPtr, textChunkSize, textOffset,¬getTextFileRefNum()) into tmpBufferput word 1 of tmpBuffer into soughtWordget offset ("{[(", tmpBuffer)put char It + 4 to It + 200 of tmpBuffer into tmpBufferput line 2 of tmpBuffer into cardNumput line 1 of tmpBuffer into stackNamego to card cardNum of stack stackName in a new windowfind soughtWordend mouseUp</script>
</part>
<part>
<id>11</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>234</left>
<top>62</top>
<right>423</right>
<bottom>184</bottom>
</rect>
<style>scrolling</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Monaco</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<textHeight>12</textHeight>
<name>FTvars</name>
<script></script>
</part>
<part>
<id>16</id>
<type>button</type>
<visible> <false /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>233</left>
<top>20</top>
<right>255</right>
<bottom>42</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>29513</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>fill subset 1</name>
<script>on mouseUp-- fill the subset associated with Index field #1checkOpenDatabaseif not (getSubsetHandle(1) = 0 or getSubsetHandle(1) = empty) thenget zbrowser ("RELEASESUBSET", getSubsetHandle(1))setSubsetHandle 1,0end ifbrowseIndex1hide field "searchPattern1"hide bg button "and subsets"hide bg button "or subsets"hide bg button "not subset 1"hide bg button "fill subset 1"end mouseUp</script>
</part>
<part>
<id>17</id>
<type>button</type>
<visible> <false /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>233</left>
<top>40</top>
<right>255</right>
<bottom>62</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>29515</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>not subset 1</name>
<script>on mouseUp-- invert the subset associated with Index field #1checkOpenDatabaseif (getSubsetHandle(1) = 0 or getSubsetHandle(1) = empty) thenbeepanswer "Sorry, subset not open!"exit to HyperCardelseget zbrowser ("BOOLEANNOTSUBSET", getSubsetHandle(1))end ifbrowseIndex1if the number of words in field "SearchPattern1" > 1 thenput "not (" before field "SearchPattern1"put ")" after field "SearchPattern1"elseput "not " before field "SearchPattern1"end ifshow field "SearchPattern1"end mouseUp</script>
</part>
<part>
<id>18</id>
<type>button</type>
<visible> <false /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>240</left>
<top>61</top>
<right>271</right>
<bottom>83</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>29518</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>or subsets</name>
<script>on mouseUp-- union (Boolean OR) subsetscheckOpenDatabaseif (getSubsetHandle(1) = 0 or getSubsetHandle(1) = empty or¬getSubsetHandle(2) = 0 or getSubsetHandle(2) = empty) thenbeepanswer "Sorry, subset not open!"exit to HyperCardend ifif clickedOnLeftHalf() thenget zbrowser ("ORSUBSETS", getSubsetHandle(1), getSubsetHandle(2))browseIndex1if field "SearchPattern1" is empty thenput field "SearchPattern2" into field "SearchPattern1"elseif the number of words in field "SearchPattern2" > 1 thenput " or (" & field "SearchPattern2" & ")" after field¬"SearchPattern1"elseput " or " & field "SearchPattern2" after field "SearchPattern1"end ifend ifelseget zbrowser ("ORSUBSETS", getSubsetHandle(2), getSubsetHandle(1))browseIndex2if field "SearchPattern2" is empty thenput field "SearchPattern1" into field "SearchPattern2"elseif the number of words in field "SearchPattern1" > 1 thenput " or (" & field "SearchPattern1" & ")" after field¬"SearchPattern2"elseput " or " & field "SearchPattern1" after field "SearchPattern2"end ifend ifend ifend mouseUp</script>
</part>
<part>
<id>19</id>
<type>button</type>
<visible> <false /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>240</left>
<top>82</top>
<right>271</right>
<bottom>104</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>29517</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>and subsets</name>
<script>on mouseUp-- intersection (Boolean AND) subsetscheckOpenDatabaseif (getSubsetHandle(1) = 0 or getSubsetHandle(1) = empty or¬getSubsetHandle(2) = 0 or getSubsetHandle(2) = empty) thenbeepanswer "Sorry, subset not open!"exit to HyperCardend ifif clickedOnLeftHalf() thenget zbrowser ("ANDSUBSETS", getSubsetHandle(1), getSubsetHandle(2))browseIndex1if field "SearchPattern1" is not empty thenif the number of words in field "SearchPattern2" > 1 thenput " and (" & field "SearchPattern2" & ")" after field¬"SearchPattern1"elseput " and " & field "SearchPattern2" after field "SearchPattern1"end ifend ifelseget zbrowser ("ANDSUBSETS", getSubsetHandle(2), getSubsetHandle(1))browseIndex2if field "SearchPattern2" is not empty thenif the number of words in field "SearchPattern1" > 1 thenput " and (" & field "SearchPattern1" & ")" after field¬"SearchPattern2"elseput " and " & field "SearchPattern1" after field¬"SearchPattern2"end ifend ifend ifend mouseUp</script>
</part>
<part>
<id>21</id>
<type>button</type>
<visible> <false /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>257</left>
<top>20</top>
<right>279</right>
<bottom>42</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>29513</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>fill subset 2</name>
<script>on mouseUp-- fill the subset associated with Index field #2checkOpenDatabaseif not (getSubsetHandle(2) = 0 or getSubsetHandle(2) = empty) thenget zbrowser ("RELEASESUBSET", getSubsetHandle(2))setSubsetHandle 2,0end ifbrowseIndex2hide field "searchPattern2"hide bg button "and subsets"hide bg button "or subsets"hide bg button "not subset 2"hide bg button "fill subset 2"end mouseUp</script>
</part>
<part>
<id>22</id>
<type>button</type>
<visible> <false /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>257</left>
<top>40</top>
<right>279</right>
<bottom>62</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>29515</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>not subset 2</name>
<script>on mouseUp-- invert the subset associated with Index field #2checkOpenDatabaseif (getSubsetHandle(2) = 0 or getSubsetHandle(2) = empty) thenbeepanswer "Sorry, subset not open!"exit to HyperCardelseget zbrowser ("BOOLEANNOTSUBSET", getSubsetHandle(2))end ifbrowseIndex2if the number of words in field "SearchPattern2" > 1 thenput "not (" before field "SearchPattern2"put ")" after field "SearchPattern2"elseput "not " before field "SearchPattern2"end ifshow field "SearchPattern2"end mouseUp</script>
</part>
<part>
<id>29</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>216</left>
<top>104</top>
<right>233</right>
<bottom>120</bottom>
</rect>
<style>rectangle</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>20407</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>scrollDownIndex1</name>
<script>on mouseDownglobal indexLinescheckOpenDatabaseif line indexLines of field Index1 is empty thenbeepexit mouseDownend ifsetWordNum1 (getWordNum1() + 1)browseIndex1end mouseDownon mouseStillDownglobal indexLinesif line indexLines of field Index1 is empty thenbeepexit mouseStillDownend ifsetWordNum1 (getWordNum1() + 2)browseIndex1end mouseStillDown</script>
</part>
<part>
<id>37</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>495</left>
<top>123</top>
<right>512</right>
<bottom>139</bottom>
</rect>
<style>rectangle</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>24019</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>scrollUpContext</name>
<script>on mouseDowncheckOpenDatabaseif line 1 of field Context is empty then exit mouseDownbrowseContext 2setInstanceNum getTextPtrListInstanceItem (1)end mouseDownon mouseStillDownif line 1 of field Context is empty then exit mouseStillDownbrowseContext 3setInstanceNum getTextPtrListInstanceItem (1)end mouseStillDown</script>
<script>on mouseDownglobal contextLinescheckOpenDatabaseif line contextLines of field Context is empty then exit mouseDownsetInstanceNum getTextPtrListInstanceItem (contextLines)browseContext contextLines-1setInstanceNum getTextPtrListInstanceItem (1)end mouseDownon mouseStillDownglobal contextLinesif line contextLines of field Context is empty then exit mouseStillDownsetInstanceNum getTextPtrListInstanceItem (contextLines)browseContext contextLines-2setInstanceNum getTextPtrListInstanceItem (1)end mouseStillDown</script>
</part>
<part>
<id>41</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>474</left>
<top>6</top>
<right>506</right>
<bottom>26</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>29531</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>bold</textStyle>
<name>Open</name>
<script>on mouseUpglobal indexLinescloseDatabase -- close out any open files firstget openCloseFiles ( ) -- put up dialog box to pick databaseif It is empty then exit to HyperCard -- quit if user chooses 'Cancel'if char 1 of It is "{" then -- display error msg if necessaryanswer Itexit mouseUpend ifput line 2 of It into field "database name"set cursor to watchlock screensetTextFileRefNum(word 1 of It) -- store returned refNum valuessetKeyFileRefNum(word 2 of It)setPtrFileRefNum(word 3 of It)setNeighborhoodSize 48 -- initialize neighborhood for proximity searchsetSubsetHandle 1,0 -- initialize subsets to emptysetSubsetHandle 2,0setWordNum1 (line 1 of zbrowser("LOCATE", "A", getKeyFileRefNum()))if getWordNum1() < 0 then setWordNum1(0)setWordNum2 (line 1 of zbrowser("LOCATE", "Z", getKeyFileRefNum()))if getWordNum2() < 0 then setWordNum2(0)browseIndex1 -- load index windowsbrowseIndex2setInstanceNum(getInstanceList1item (1))browseContext 1end mouseUp</script>
</part>
<part>
<id>45</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>0</left>
<top>265</top>
<right>233</right>
<bottom>340</bottom>
</rect>
<style>shadow</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Monaco</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<textHeight>12</textHeight>
<name>SearchPattern1</name>
<script>on mouseUphide field "SearchPattern1"end mouseUp</script>
</part>
<part>
<id>46</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>279</left>
<top>265</top>
<right>512</right>
<bottom>340</bottom>
</rect>
<style>shadow</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Monaco</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<textHeight>12</textHeight>
<name>SearchPattern2</name>
<script>on mouseUphide field "SearchPattern2"end mouseUp</script>
</part>
<part>
<id>47</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>19</left>
<top>8</top>
<right>192</right>
<bottom>23</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Monaco</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<textHeight>12</textHeight>
<name>database name</name>
<script></script>
</part>
<name>BrowserBg</name>
<script>on openCard -- make sure subset buttons are right for this cardput getSubsetHandle(1) = 0 or getSubsetHandle(1) = empty into noSub1put getSubsetHandle(2) = 0 or getSubsetHandle(2) = empty into noSub2if noSub1 and noSub2 then -- no subsets active on this cardhide bg button "and subsets"hide bg button "or subsets"hide bg button "not subset 1"hide bg button "not subset 2"hide bg button "fill subset 1"hide bg button "fill subset 2"else if noSub1 then -- only subset 2 active on this cardhide bg button "and subsets"hide bg button "or subsets"hide bg button "not subset 1"hide bg button "fill subset 1"show bg button "fill subset 2"show bg button "not subset 2"else if noSub2 then -- only subset 1 active on this cardhide bg button "and subsets"hide bg button "or subsets"hide bg button "not subset 2"hide bg button "fill subset 2"show bg button "fill subset 1"show bg button "not subset 1"else -- both subsets 1 and 2 active on this cardshow bg button "fill subset 1"show bg button "fill subset 2"show bg button "not subset 1"show bg button "not subset 2"show bg button "or subsets"show bg button "and subsets"end ifend openCardon closeCard -- tidy up when leaving...hide field "searchPattern1"hide field "searchPattern2"end closeCard</script>